package com.dawn.system.sys.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.dawn.system.sys.entity.Resource;

public interface ResourceMapper {
	int deleteByPrimaryKey(Long id);

    int insert(Resource record);

    int insertSelective(Resource record);

    Resource selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Resource record);

    int updateByPrimaryKey(Resource record);
    
    List<Resource> selectResourceListByMenuId(@Param("menuId") Long menuId);
    
    List<Resource> selectResourceListByMenuIdView(@Param("menuId") Long menuId);
    
    List<Resource> selectResourceListByPid(@Param("pid") Long pid);
    
    List<Resource> selectResourceTreeByMenuId(@Param("menuId") Long menuId);
    
    Resource selectByHref(String href) ;
    
    int nextSort(@Param("pid") Long pid, @Param("menuId") Long menuId);
    
}